package com.itheima.app;

import com.itheima.config.SpringConfig3;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App3 {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig3.class);
        String[] name = context.getBeanDefinitionNames();
        for(String beanName : name){
            System.out.println(beanName);
        }
        System.out.println(context.getBean("dog"));
    }
}
